package com.zretc.emptraining.serviceimpl;

import java.util.List;

import com.zretc.emptraining.dao.CourseEvaDao;
import com.zretc.emptraining.daoimpl.CourseEvaDaoImpl;
import com.zretc.emptraining.dbtools.PageData;
import com.zretc.emptraining.entity.CourseEva;
import com.zretc.emptraining.service.CourseEvaService;

public class CourseEvaServiceImpl implements CourseEvaService{
	//创建Dao对象
	CourseEvaDao courseEvaDao = new CourseEvaDaoImpl();

	@Override
	public boolean addCourseEva(CourseEva courseEva) {
		
		return courseEvaDao.addCourseEva(courseEva);
	}

	@Override
	public List<CourseEva> getCourseEvaAll() {
		
		return courseEvaDao.getCourseEvaAll();
	}

	@Override
	public PageData<CourseEva> getCourseEvaByPage(int page, int pageSize, String courseName) {
		if(page < 1) {
			page = 1;
		}
		return courseEvaDao.getCourseEvaByPage(page, pageSize, courseName);
	}

	@Override
	public boolean updCourseEva(CourseEva courseEva) {
		// TODO Auto-generated method stub
		return courseEvaDao.updCourseEva(courseEva);
	}
	
	@Override
	public PageData<CourseEva> getCourseEvaByCpNo(int page, int pageSize, int cpNo) {
		if(page < 1) {
			page = 1;
		}
		return courseEvaDao.getCourseEvaByCpNo(page, pageSize, cpNo);
	}

}
